libxc: Propagate errno from hypercall instead of anything else.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 19 Mar 2015 00:24:08 +0000 (20:24 -0400)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 20 Mar 2015 16:04:35 +0000 (16:04 +0000)
commite12c6e8d186e42e659122461735ea38963c1d153
tree95bea6b9ff43355fa36d4e8dd9709d4d4e358ef3
parentce156118ae8bd72e9b77b8336ea6819049390c65
libxc: Propagate errno from hypercall instead of anything else.

After we have done the hypercall - the errno has the failure
code. However our usage of pthread and munmap can trigger them
to manipulate the errno with their failure values. That would
be bad as what we care about is just the hypercall error value.

Another solution to this would be to save the 'errno' from
pthread/munmap/madvise as an extra parameter to be analyzed
later. However the call-sites above us do not care about it.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/xc_freebsd_osdep.c
tools/libxc/xc_hcall_buf.c
tools/libxc/xc_linux_osdep.c